package com.funmi.lizip.entity;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;

import java.io.Serializable;

import com.funmi.lizip.utils.ObjectJsonHandler;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 *
 * </p>
 *
 * @author yeyg
 * @since 2022-11-03
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName(value = "ec_patrol", autoResultMap = true)
public class Patrol implements Serializable {

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 任务开始时间
     */
    private LocalDateTime startTime;

    /**
     * 任务结束时间
     */
    private LocalDateTime endTime;

    /**
     * 任务内容
     */
    private String patrolContent;

    /**
     * 巡护方式
     */
    private String patrolType;

    /**
     * 责任区号
     */
    private String dutyAreaCode;

    /**
     * 小地名
     */
    private String smallPlace;

    /**
     * 面积
     */
    private String area;

    /**
     * 林班号
     */
    private String forestPatchCode;

    /**
     * 小班号
     */
    private String smallPatchCode;

    /**
     * 任务状态
     */
    private Integer status;

    /**
     * 是否删除 1:删除
     */
    @TableField(value = "is_delete",select = false)
    @TableLogic
    private Boolean delete;

    /**
     * 巡护员ID json
     */
    @TableField(value = "ranger_ids", typeHandler = ObjectJsonHandler.class)
    private JSONObject rangerIds;

    /**
     * 任务名称
     */
    private String patrolName;

    /**
     * 区域名称
     */
    private String region;


    private LocalDateTime createAt;


}
